#ifndef BASE_H
#define BASE_H
#include "robots/IRobot.h"
#include "world/TheWorld.h"
#include "world/Radar.h"

#include <set>

//! TODO: impelement "Wings" upgrade. When ControlCenter researches "Wings"
//! technology, than any produced robot has own wings. Until it researched
//! only Researchers have wings. You can use boolean flag to detect it and
//! you can extend RobotsFactory

class RobotsFactory;
class Researcher;
class Worker;
class Warrior;

class ControlCenter
{
public:
    ControlCenter();

    Researcher &createResearcher();
    Warrior &createWarrior();
    Worker &createWorker();

    void printRobotsData();

    std::vector<IRobot *> & getRobots();

private:
    void registerRobot(const IRobotPtr &ptr);

    std::set<IRobotPtr> _robotsOnBase;
    std::shared_ptr<IRobot> _mainRobot;
    std::unique_ptr<Radar> _radar;
    std::unique_ptr<RobotsFactory> _factory;
};

#endif // BASE_H
